package com.fyt.ZhongYaoApp.service.impl;

import com.fyt.ZhongYaoApp.mapper.ZYCatMapper;
import com.fyt.ZhongYaoApp.pojo.ZYCat;
import com.fyt.ZhongYaoApp.service.ZYCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZYCatServiceImpl implements ZYCatService {

    @Autowired
    private ZYCatMapper zyCatMapper;

    @Override
    public void add(ZYCat zyCat) {
        zyCatMapper.add(zyCat);

    }

    @Override
    public String getNameById(ZYCat zyCat) {
        return zyCatMapper.getNameById(zyCat);
    }

    @Override
    public List<ZYCat> zyCatList() {
        return zyCatMapper.zyCatList();
    }

    // 根据cat名字查询cat对象
    @Override
    public ZYCat findByZYCatName(String zyname) {
        return zyCatMapper.findByZYCatName(zyname);
    }



}
